package com.neoyr.meeting.common;

import lombok.Data;

@Data
public class  Result<T> {
    private Integer code;
    private String msg;
    private  T data;

    public static <T>Result<T> success(T data){

       Result result=new Result();
       result.setMsg("成功");
       result.setCode(1);
       result.setData(data);
        return  result;
    }

    public static <T>Result<T> success(String data){

        Result result=new Result();
        result.setMsg(data);
        result.setCode(1);
        result.setData(data);
        return  result;
    }
    public static <T>Result<T> failed(String data){
        Result result=new Result();
        result.setMsg(data);
        result.setCode(0);
        return  result;
    }


}
